<div class="main_top">

  <button nz-button nzType="primary" (click)="showModel()">增加关键词</button>
<!-- 增加 -->
  <nz-modal
      [(nzVisible)]="isAddVisible"
      nzTitle="增加舆情关键词"
      (nzOnCancel)="handleCancel()"
      (nzOnOk)="handleAdd()"
      [nzOkLoading]="isOkAddLoading"
  >
  <p *nzModalContent class="input_list">
    <li>
        <span>必须包含关键词：</span> <input nz-input placeholder="必须包含关键词" [(ngModel)]="inputAddData.keyword" />
    </li>

    <li>
        <span>可包含关键词：</span><input nz-input placeholder="可包含关键词" [(ngModel)]="inputAddData.may_keyword" />         
    </li>

    <li>
    <span>不包含关键词：</span><input nz-input placeholder="不包含关键词" [(ngModel)]="inputAddData.nokeyword" />         
    </li>

    <li>
    <span> 监控频率：</span><input nz-input placeholder="监控频率" [(ngModel)]="inputAddData.frequency" />         
    </li>
</p>
  </nz-modal>

<!-- 修改 -->
  <nz-modal
  [(nzVisible)]="isEditVisible"
  nzTitle="修改舆情关键词"
  (nzOnCancel)="handleCancel()"
  (nzOnOk)="handleEdit()"
  [nzOkLoading]="isOkEditLoading"
>
<p *nzModalContent class="input_list">
  <li>
      <span>必须包含关键词：</span> <input nz-input placeholder="必须包含关键词" [(ngModel)]="inputEditData.keyword" />
  </li>

  <li>
      <span>可包含关键词：</span><input nz-input placeholder="可包含关键词" [(ngModel)]="inputEditData.may_keyword" />         
  </li>

  <li>
  <span>不包含关键词：</span><input nz-input placeholder="不包含关键词" [(ngModel)]="inputEditData.nokeyword" />         
  </li>

  <li>
  <span> 监控频率：</span><input nz-input placeholder="监控频率" [(ngModel)]="inputEditData.frequency" />         
  </li>
</p>
</nz-modal>
</div>
<nz-table #basicTable [nzData]="listData" [nzShowPagination]="false">
  <thead>
    <tr>
      <th>必须包含</th>
      <th>可包含</th>
      <th>不包含</th>
      <th>监控评率</th>
      <th nzAlign="center">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of listData">
      <td>{{ data.keyword }}</td>
      <td>{{ data.may_keyword }}</td>
      <td>{{ data.nokeyword }}</td>
      <td>
          {{ data.frequency }}
      </td>
      <td nzAlign="center">
        <button nz-button (click)="showEditModal(data.id)">修改</button>
        &nbsp;
        
       <button nz-button (click)="deleteKeywords(data.id)">删除</button>
      </td>
    </tr>
  </tbody>
</nz-table>
